#ifndef COLLADA_H_
#define COLLADA_H_

#include <boost/function.hpp>

#include "colladatype.h"

#include "object.h"
#include "element.h"
	#include "library.h"
		#include "geometry.h"
			#include "mesh.h"
				#include "source.h"
		#include "visualscene.h"
			#include "node.h"
	#include "scene.h"
#include "data.h"

namespace Collada
{

	class Empty
	{
	public :
		static Element* Create( const char*, const char*, Element*, const void* )
		{ 
			return NULL; 
		}
	};
	
	Data*	LoadFromFile( const std::string& path );

	inline Format SetFormat( unsigned char first, unsigned char second, unsigned char third, unsigned int fourth )
	{
		return ( first ) + ( second << 4 ) + ( third << 8 ) + ( fourth << 12 );
	}

	inline int		SizeOfType( Type type )
	{
		int upper = ( type & 0x00F00000 ) >> 20;
		int lower = ( type & 0x000F0000 ) >> 16;

		return ( upper )? upper*lower : lower;
	}
	PrimitiveType	StrToPrimitiveType( const std::string& str );
	Semantic		StrToSemantic( const std::string& str );
	Type			StrToType( const std::string& str );
};

#endif